package com.efrei.uchat.client.gui.view;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;

public class CroomRequest extends JPanel {

	private static final long serialVersionUID = -9184303209509481649L;

	private JTextField txtTopic;
	private JPasswordField txtPassword;
	private JLabel lblTopic;
	private JLabel lblPasswordoptionnal;
	
	public CroomRequest() {
		GridBagLayout gridBagLayout = new GridBagLayout();
		gridBagLayout.columnWidths = new int[]{0, 0, 0, 0};
		gridBagLayout.rowHeights = new int[]{0, 0, 0};
		gridBagLayout.columnWeights = new double[]{1.0, 2.0, 0.0, Double.MIN_VALUE};
		gridBagLayout.rowWeights = new double[]{0.0, 0.0, Double.MIN_VALUE};
		setLayout(gridBagLayout);
		
		this.lblTopic = new JLabel("Topic :");
		GridBagConstraints gbc_lblTopic = new GridBagConstraints();
		gbc_lblTopic.insets = new Insets(0, 0, 5, 5);
		gbc_lblTopic.anchor = GridBagConstraints.EAST;
		gbc_lblTopic.gridx = 0;
		gbc_lblTopic.gridy = 0;
		add(this.lblTopic, gbc_lblTopic);
		
		this.txtTopic = new JTextField();
		GridBagConstraints gbc_txtTopic = new GridBagConstraints();
		gbc_txtTopic.insets = new Insets(0, 0, 5, 5);
		gbc_txtTopic.fill = GridBagConstraints.HORIZONTAL;
		gbc_txtTopic.gridx = 1;
		gbc_txtTopic.gridy = 0;
		add(this.txtTopic, gbc_txtTopic);
		this.txtTopic.setColumns(10);
		
		this.lblPasswordoptionnal = new JLabel("Password (optionnal) :");
		GridBagConstraints gbc_lblPasswordoptionnal = new GridBagConstraints();
		gbc_lblPasswordoptionnal.insets = new Insets(0, 0, 0, 5);
		gbc_lblPasswordoptionnal.anchor = GridBagConstraints.EAST;
		gbc_lblPasswordoptionnal.gridx = 0;
		gbc_lblPasswordoptionnal.gridy = 1;
		add(this.lblPasswordoptionnal, gbc_lblPasswordoptionnal);
		
		this.txtPassword = new JPasswordField();
		GridBagConstraints gbc_txtPasswordoptionnal = new GridBagConstraints();
		gbc_txtPasswordoptionnal.insets = new Insets(0, 0, 0, 5);
		gbc_txtPasswordoptionnal.fill = GridBagConstraints.HORIZONTAL;
		gbc_txtPasswordoptionnal.gridx = 1;
		gbc_txtPasswordoptionnal.gridy = 1;
		add(this.txtPassword, gbc_txtPasswordoptionnal);
		this.txtPassword.setColumns(10);
	}

	public JTextField getTxtTopic() {
		return txtTopic;
	}

	public JPasswordField getTxtPassword() {
		return txtPassword;
	}
}
